# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=pcsc-cyberjack
pkgver=3.99.5_p16
_pkgver=${pkgver/_p/_SP}
_filever=${_pkgver%_SP*}final.${_pkgver#*_}
pkgrel=0
pkgdesc="PCSC driver for Reiner SCT cyberjack card reader"
url="https://www.reiner-sct.com/"
arch="all"
license="GPL-2.0-only"
depends="pcsc-lite"
makedepends="autoconf automake libtool pcsc-lite-dev libusb-dev"
options="!check"
source="pcsc-cyberjack_$_filever.tar.bz2::https://support.reiner-sct.de/downloads/LINUX/V$_pkgver/pcsc-cyberjack-$_filever.tar.bz2"
builddir="$srcdir/$pkgname-$_filever"

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure \
		--prefix=/usr \
		--disable-static \
		--mandir=/usr/share/man/man8 \
		--sysconfdir=/etc/"$pkgname"  \
		--enable-udev \
		--with-usbdropdir="$(pkg-config libpcsclite --variable=usbdropdir)"
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
ece83377b935b6f4de065c10b340aea91d69c54ff38f73e058f5e31fd75afe1e2d3fe9be2e1423a5e3a0da17d9afa5db7684e85805af34e751d07188f894b2d7  pcsc-cyberjack_3.99.5final.SP16.tar.bz2
"
